<template>
  <div class="me">
    <input type="text" placeholder="电话" v-model="phone">
    <br>
    <input type="password" placeholder="密码" v-model="pwd">
    <br>
    <button @click="login()">登录</button>
  </div>
</template>

<script>
import {userlogin} from '../utils/api'
export default {
    data(){
        return{
            phone:'123',
            pwd:'4434',
        }
    },
    methods:{
      login(){
        let phone = this.phone
        let pwd = this.pwd
          userlogin({phone:phone,pass:pwd}).then((res)=>{
      if (res.data.code=200) {
        alert(res.data.msg)
      }else{
        alert('登录失败')
      }
    })
      }
    }
}
</script>

<style lang="scss" scoped>
.me{
    padding: 30vw 0 0 5vw;
}
.me input{
    width: 50vw;
    height: 8vw;
    margin-bottom: 5vw;
}
</style>